#include "CServer.h"

BOOL g_bExit = TRUE;

void WhileExit()
{
    getchar();
    g_bExit = FALSE;
}

int main()
{
    CServer TcpServer;

    TcpServer.Bind(NULL, 4567);
    TcpServer.Listen(5);
    TcpServer.RunServer();

    std::thread t(WhileExit);
    t.detach();

    while (g_bExit)
        Sleep(10);

    TcpServer.Close();
    system("pause");

    return 0;
}